home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
pc
/
mac_file
/
vendor_d
/
neuralwa
/
nw2v50
/
pnn.ind
< prev
next >
Wrap
File List
|
1993-08-23
|
4KB
|
233 lines
inst4.1
!****************************************************************
!* *
!* Probabilistic Neural Network Builder *
!* *
!****************************************************************
!
?&In 1
>bge ChkProto
@Err "Probabilistic Neural Network MUST have at least one input PE"
:ChkProto
?&Prt 1
>bge CheckOut
@Err "Probabilistic Neural Network MUST have at least one pattern unit"
:CheckOut
?&Out 2
>bge OutOK
@Err "Probabilistic Neural Network MUST have at least two output PEs"
:OutOK
! *** Load the Control Strategy ***
@LdCS "pnn"
=netn "Untitled"
=DLnF 0 !learn re-display off
=DRcF 0 !recall re-display off
! *** Build the Input Layer ***
@LLdf !load default layer to menu area
=LDln "In" !layer name
=Lpes &In !copy # of input PEs from menu
=x 100 !place to put layer on screen
=y 40
@LDfW !Default # weight fields
@LAdd !add the input layer
! *** Build a Projection Layer if projection summation ***
?RBFS 2 !Projection summation?
>bne ProjL1 !No
#Incl "proj_lyr.iif"
=n6 LayN !Previous Layer
:ProjL1
!
! Build Pattern layer
!
@LLdf !start with default layer again
=LDln "Pattern" !layer name
=Lpes &Prt !Number of PEs
! Summation function
?RBFS 1 !City-Block?
>bne Sum1
=Lsum "City-Block"
>br SumEnd
:Sum1
?RBFS 2 !Projection?
>bne Sum2
=Lsum "Sum" !standard summation
>br SumEnd
:Sum2 !Default
=Lsum "Euclidean"
:SumEnd
=Ltrn "Linear"
=Llrn "K-Means"
=Lerf "standard"
=Ltrn "PNN"
=Lcmp "Select"
! Set up schedule
@NLRS "PNN"
! Column A
=lcta 99999
=ArrX 1
=lcft "No Recode"
=lcfa 0.0
! Radius of Influence
=ArrX 2
=lcft "Cluster Radius"
=lcfa RInf
! Sigma Scale
=ArrX 5
=rcfa SgSc
=rcft "Sigma Scale"
! Sigma Exponent
=ArrX 6
=rcfa SgEx
=rcft "Sigma Exponent"
@SLRS
=ArrX 0
=Llrs "PNN"
=LInH 0.1
=LInL -0.1
+y 60 !up higher on display
@LDfW !Default # weight fields
@LAdd
! Connect input layer to pattern layer
=cnwt 1.0
=cnty WVar !Variable
=cnsc WRel !Relative
=SPEl LayN !destination layer
@SlPE !select as destination
=NPEl n6 !source layer
@NrPE !select as source
@LCFl !full connections
=n6 LayN !previous layer
! Now build summation layer
@LLdf !start with default layer again
=LDln "Summation" !layer name
=Lpes &Out !Number of PEs
=Lsum "Sum"
=Ltrn "Linear"
=Lcmp "Direct"
=Llrn "PNN"
=Lerf "standard"
=LInH 1.0
=LInL 1.0
+y 60 !up higher on display
@LDfW !Default # weight fields
@LAdd
! Now do connections.
=cnwt 1.0
=cnty WVar !Variable
=cnsc WRel !Relative
=SPEl LayN !summation layer
=SPEn 0
=NPEl n6 !prototype layer
=NPEn 0
:RndRbnLp
@SlPE !select next PE in output layer
@NrPE !select next PE in pattern layer
@PCon !connect two PEs together
+SPEn 1 !next PE in output layer
?SPEn &Out !past the end?
>blt OutPEOK
=SPEn 0 !back to start of output layer
:OutPEOK
+NPEn 1 !next PE in the competitive layer
?NPEn &Prt !done with layer?
>blt RndRbnLp !no, keep going
=n6 LayN !previous layer
! Output layer
@LLdf !start with default layer again
=LDln "Out" !layer name
=Lpes &Out !Number of PEs
=Lsum "Sum"
=Ltrn "Linear"
?PNom 1 !Probabilistic Output?
>bne NotPbOut
=Lcmp "Direct"
>br OutMdEnd
:NotPbOut
?PNom 2 !Normalized Output?
>bne NotNmOut
=Lcmp "Normalize"
>br OutMdEnd
:NotNmOut
=Lcmp "One-Active-Highest"
:OutMdEnd
=Lerf "standard"
=LInH 1.0
=LInL 1.0
+y 50
@LAdd
! Fixed corresponding connections
=cnwt 1.0
=cnty WFix !Variable
=cnsc WRel !Relative
=SPEl LayN
=SPEn 0
@SlPE
=NPEl n6
=NPEn 0
@NrPE
@LCCr
=LnPr 0 !no pruning
! *** Select Control Strategy & L/R Schedule ***
@LLsl !load super layer
!
! I/O parameters:
!
=Llnn "train" !name of learn input
=Lrcn "test" !name of recall output
#Incl "stdioset.iif" !standard I/O settings
=Lax1 Epch !set epoch from dialog
! Target ranges for MinMax tables
=Lscl -1.0 !input low-value
=Loff 1.0 !input high-value
=Llow 0.0 !output low-value
=Lhgh 1.0 !output high-value
!
=Lctl "pnn"
=GrLF "pnn" !Instrument List file
!
=Llio 1 !Ascii, sequential
@SVsl !save it back
!
! Miscellaneous globals
=Grph 1 !Activate instrument list
=jogl -.1 !lower limit for jog
=jogh +.1 !upper limit for jog
=seed 257 !starting seed number
@seed !set the seed
!
! Recall/Test modes
=RnTm 1
=RnRm 1
!set to learn one pass/all
=RnLm 1
!
!
! Initialize the network
!
@Nini
@EOF